You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TMtx Class > TMtx Methods > CopyVec Method > TMtx.CopyVec Method ([In] TVec, int)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TMtx.CopyVec Method ([In] TVec, int)

Copies values from vector to a matrix.

Syntax
C#
Visual Basic
public TMtx CopyVec([In] TVec Vec, int NrRows);

Copy all Vec elements to the calling matrix. Set the calling matrix Rows property to NrRows. Set the calling matrix Cols property to Vec.Length div NrRow (Length = Rows*Cols). The calling matrix TMtxVec.ComplexComplex property is adjusted automatically. An exception is raised if Vec.Length mod NrRows <> 0.

var A: TMtx; v: TVec; begin CreateIt(A); Create(v); try v.SetIt(true,[1, 0, 2, -1, 5, 1.2]) ; A.CopyVec(v); finally FreeIt(A); end; end;
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!